/* eslint-disable */
import request from "@/request";

/** save POST /api/api/shopPart/address/add */
export async function saveUsingPost(
  body: API.AddressBook,
  options?: { [key: string]: any }
) {
  return request<API.BaseResponseVoid_>("/api/api/shopPart/address/add", {
    method: "POST",
    headers: {
      "Content-Type": "application/json",
    },
    data: body,
    ...(options || {}),
  });
}

/** getDefault GET /api/api/shopPart/address/default */
export async function getDefaultUsingGet(options?: { [key: string]: any }) {
  return request<API.BaseResponseAddressBook_>(
    "/api/api/shopPart/address/default",
    {
      method: "GET",
      ...(options || {}),
    }
  );
}

/** delete POST /api/api/shopPart/address/delete */
export async function deleteUsingPost(
  body: API.AddressBook,
  options?: { [key: string]: any }
) {
  return request<API.BaseResponseVoid_>("/api/api/shopPart/address/delete", {
    method: "POST",
    headers: {
      "Content-Type": "application/json",
    },
    data: body,
    ...(options || {}),
  });
}

/** get POST /api/api/shopPart/address/get */
export async function getUsingPost(
  body: API.AddressBook,
  options?: { [key: string]: any }
) {
  return request<API.BaseResponseAddressBook_>(
    "/api/api/shopPart/address/get",
    {
      method: "POST",
      headers: {
        "Content-Type": "application/json",
      },
      data: body,
      ...(options || {}),
    }
  );
}

/** list GET /api/api/shopPart/address/list */
export async function listUsingGet(options?: { [key: string]: any }) {
  return request<API.BaseResponseListAddressBook_>(
    "/api/api/shopPart/address/list",
    {
      method: "GET",
      ...(options || {}),
    }
  );
}

/** setDefault POST /api/api/shopPart/address/setDefault */
export async function setDefaultUsingPost(
  body: API.AddressBook,
  options?: { [key: string]: any }
) {
  return request<API.BaseResponseVoid_>(
    "/api/api/shopPart/address/setDefault",
    {
      method: "POST",
      headers: {
        "Content-Type": "application/json",
      },
      data: body,
      ...(options || {}),
    }
  );
}

/** update POST /api/api/shopPart/address/update */
export async function updateUsingPost(
  body: API.AddressBook,
  options?: { [key: string]: any }
) {
  return request<API.BaseResponseVoid_>("/api/api/shopPart/address/update", {
    method: "POST",
    headers: {
      "Content-Type": "application/json",
    },
    data: body,
    ...(options || {}),
  });
}
